﻿<%@ Page Language="C#" MasterPageFile="~/Templates/Application.master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="Activity_Default" Title="活动 - clubof.net" %>

<%@ Register TagPrefix="FrienDev" TagName="ActivityListControl" Src="../Controls/Activity/List.ascx" %>
<%@ Register TagPrefix="FrienDev" TagName="ActivitySearchControl" Src="../Controls/Search/ActivitySearch.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="../CSS/activity.css" rel="Stylesheet" type="text/css" />
    <link href="../CSS/default.css" rel="Stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content_Middle" ContentPlaceHolderID="ContentPlaceHolder" runat="Server">

    <script type="text/javascript">
        function area_show(index) {
            if (index == 3) {
                window.location.href = "/activity/activityEdit.aspx?show=activity";
                return;
            }
            for (var i = 1; i <= 3; i++) {
                // if (document.getElementById("show" + i.toString()) != null) {
                // document.getElementById("show" + i.toString()).style.display = 'none';
                //}
                if (document.getElementById("li" + i.toString()) != null) {
                    document.getElementById("li" + i.toString()).className = 'showli';
                }
            }
            //document.getElementById("show" + index.toString()).style.display = 'block';
            document.getElementById("li" + index.toString()).className = 'showli_click';
        }

        //        var request = {
        //            QueryString: function(val) {
        //                var uri = window.location.search;
        //                var re = new RegExp("" + val + "=([^&?]*)", "ig");
        //                return ((uri.match(re)) ? (uri.match(re)[0].substr(val.length + 1)) : null);
        //            }
        //        }

        //        window.onload = function() {
        //            var show = request.QueryString("show");
        //            if (show == 'myactivity') {
        //                area_show(1);
        //            }
        //            else if (show == 'friendactivity') {
        //                area_show(2);
        //            }
        //            else if (show == 'addactivity') {
        //                area_show(3);
        //            }
        //        }
    </script>

    <div class="font14">
        <div style="padding-left: 14px; text-align: left; font-size: 18px; padding-top: 15px;">
            <img src="../Images/umbrella.png" />
            <asp:Label runat="server" ID="lb_Title" Font-Bold="true" ForeColor="#34567e" Text="活动" />
            <asp:Label runat="server" ID="lb_UserName" Font-Bold="true" />
        </div>
        <div class="showul_padding9and6">
            <ul class="showul" type="none">
                <li onclick="area_show(1);" class="showli_click" id="li1">
                    <asp:LinkButton ID="lbMyActivity" runat="server" OnClientClick="area_show(1)" OnClick="lbMyActivity_Click"
                        Width="90px" Height="23px"><div class="height6">
                    </div>我的活动</asp:LinkButton>
                </li>
                <li onclick="area_show(2);" class="showli" id="li2">
                    <asp:LinkButton ID="lbFriendActivity" runat="server" OnClientClick="area_show(2)"
                        OnClick="lbFriendActivity_Click" Width="90px" Height="23px"><div class="height6">
                    </div>好友的活动</asp:LinkButton>
                </li>
            </ul>
            <div class="newactivity">
                <div style="width: 14px; height: 20px; float: left; margin-right: 10px;">
                    <img src="../Images/arrow.gif" width="14" height="14" border="0" style="padding-right: 10px; padding-bottom:4px;" />
                </div>
                <div style="width: 50px; height: 14px; float: left; margin-right: 12px;">
                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Activity/ActivityEdit.aspx"
                        CssClass="newactivity_text">新建活动</asp:HyperLink>
                </div>
            </div>
            <div class="ParentSonDiv">
            </div>
        </div>
        <asp:UpdatePanel runat="server" ID="upActivity" UpdateMode="Conditional" ChildrenAsTriggers="false">
            <ContentTemplate>
                <div class="default_aspx_mainDiv">
                    <table width="100%" border="0" class="font14">
                        <tr>
                            <td align="right">
                                <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="upActivity"
                                    DynamicLayout="true">
                                    <ProgressTemplate>
                                        <div style="border: solid 1px black; width: 154px;">
                                            <table>
                                                <tr>
                                                    <td class="width18">
                                                        <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/Loading.gif" />
                                                    </td>
                                                    <td class="blue">
                                                        正在处理，请稍候...
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </ProgressTemplate>
                                </asp:UpdateProgress>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div style="text-align: left;">
                                    <FrienDev:ActivityListControl ID="activity" runat="server" />
                                </div>
                            </td>
                        </tr>
                </div>
                </table>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="lbMyActivity" EventName="Click" />
                <asp:AsyncPostBackTrigger ControlID="lbFriendActivity" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
    </div>
</asp:Content>
